package cn.itlight.controller;

import cn.itlight.domain.User;
import cn.itlight.feign.UserFeign;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
@AllArgsConstructor
public class UserController {

    private UserFeign userFeign;
    @GetMapping("/user/{id}")
    public User get(@PathVariable Long id){
        return userFeign.get(id);
    }
}
